package cn.aohan.common.dto;

import java.util.List;

/**
 * 页码vo
 *
 * @author 傲寒
 * @since 2024/3/20
 */
public class PageVO<T> {

    /**
     * 总数
     */
    private Long total;

    /**
     * 数据
     */
    private List<T> data;


    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public PageVO() {
    }

    public PageVO(Long total, List<T> data) {
        this.total = total;
        this.data = data;
    }

    public static <T> PageVO<T> of(Long total, List<T> data) {
        return new PageVO<>(total, data);
    }
}
